#include <REGX52.H>
#include "Delay.h"
#include "Nixie.h"
#include "MatrixKey.h"

sbit Buzzer=P2^5;
unsigned char key,key1,key2,m;

void main()
{		
	Buzzer=0;
	while(1)
	{
		key=m;
//		if(key)
//		{
			if(key>=10)
			{
				key1=key/10;
				key2=key%10;
				while(key==m)
				{
					nixie(1,key1);
					nixie(2,key2);
                    m=MatrixKey();
				}
			}
			else
			{
				while(key==m)
				{
					nixie(1,key);
                    m=MatrixKey();
				}
			}
	
//		}
	}
}